import { request } from "@/utils/service"

/** 增 */
export function createUserApi(data: any) {
  return request({
    url: "user/v1/addUser",
    method: "post",
    data
  })
}

/** 删 */
export function deleteUserApi(data: any) {
  return request({
    url: `user/v1/deleteUser`,
    method: "post",
    data
  })
}

/** 改 */
export function updateUserApi(data: any) {
  return request({
    url: "user/v1/update",
    method: "post",
    data
  })
}

/** 查 */
export function getUserApi(params: any) {
  return request({
    url: "/user/v1/userList",
    method: "get",
    params
  })
}

// 详情
export function getUserDetailApi(data: any) {
  return request({
    url: `User/byId`,
    method: "get",
    data
  })
}
